home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
tegl6b.zip
/
INTROPAK.EXE
/
lha
/
TEGLINTR.DOC
< prev
next >
Wrap
Text File
|
1991-08-16
|
15KB
|
584 lines
{-----------------------------------------------------------------------------}
{ TEGL Windows ToolKit II }
{ Copyright (C) 1990, 1991 TEGL Systems Corporation }
{ All Rights Reserved. }
{-----------------------------------------------------------------------------}
{$I switches.inc}
{$F+}
Unit TEGLIntr;
INTERFACE
USES Dos, {interrupt calls}
virtmem,
FastGrph; {needed for ActivePage Variable}
TYPE
FuncCallProc = Function:Boolean;
KeyRecPtr = ^KeyFlags;
KeyFlags = RECORD
NextKeyFlag : KeyRecPtr;
Repeatkey : Boolean;
KeyCode : Word;
KeyCall : FuncCallProc;
END;
TimeRecPtr = ^TimeFlags;
TimeFlags = RECORD
NextTimeFlag : timerecptr;
TimerCount : Word;
TimerStart : Word;
TimerFlag : Boolean;
TimerCall : FuncCallProc;
END;
const
TimerIgnore : boolean = FALSE;
Timerbusy : boolean = FALSE;
TimerCheck : Boolean = TRUE;
ControlBreakFlag : Boolean = FALSE;
CtrlBrkCount : Word = 0;
Mouse_Event : Word = 0;
Mouse_Xcoord : Integer = 319;
Mouse_Ycoord : Integer = 174;
Mouse_Buttons : Word = 0;
Last_Mouse_Buttons : Word = 0; {used only by TEGLIntr.ASM}
DoubleClickSpeed : Word = 6;
LeftButtonDouble : Boolean = False;
LeftButtonTimeRem : Word = 0;
LeftButtonPress : Word = 0;
LeftPressXcoord : Word = 0;
LeftPressYcoord : Word = 0;
LeftButtonRelease : Word = 0;
LeftReleaseXcoord : Word = 0;
LeftReleaseYcoord : Word = 0;
RightButtonDouble : Boolean = False;
RightButtonTimeRem : Word = 0;
RightButtonPress : Word = 0;
RightPressXcoord : Word = 0;
RightPressYcoord : Word = 0;
RightButtonRelease : Word = 0;
RightReleaseXcoord : Word = 0;
RightReleaseYcoord : Word = 0;
MiddleButtonDouble : Boolean = False;
MiddleButtonTimeRem : Word = 0;
MiddleButtonPress : Word = 0;
MiddlePressXcoord : Word = 0;
MiddlePressYcoord : Word = 0;
MiddleButtonRelease : Word = 0;
MiddleReleaseXcoord : Word = 0;
MiddleReleaseYcoord : Word = 0;
KBMouseBusy : Boolean = FALSE;
MouseShow : Boolean = FALSE;
MouseUserFlag : Boolean = FALSE;
Mouse_MaxYpos : Integer = 349;
Mouse_MinYpos : Integer = 0;
Mouse_MaxXpos : Integer = 639;
Mouse_MinXpos : Integer = 0;
FreezeCount : Word = 0;
Sk_NoShift = $00;
Sk_RightShift = $01;
Sk_LeftShift = $02;
Sk_CtrlShift = $04;
Sk_AltShift = $08;
Sk_ScrollLock = $10;
Sk_NumLock = $20;
Sk_CapsLock = $40;
Sk_InsLock = $80;
Key_ESC = $01;
Key_a = $1E;
Key_b = $30;
Key_c = $2E;
Key_d = $20;
Key_e = $12;
Key_f = $21;
Key_g = $22;
Key_h = $23;
Key_i = $17;
Key_j = $24;
Key_k = $25;
Key_l = $26;
Key_m = $32;
Key_n = $31;
Key_o = $18;
Key_p = $19;
Key_q = $10;
Key_r = $13;
Key_s = $1F;
Key_t = $14;
Key_u = $16;
Key_v = $2F;
Key_w = $11;
Key_x = $2D;
Key_y = $15;
Key_z = $2C;
Key_1 = $02;
Key_2 = $03;
Key_3 = $04;
Key_4 = $05;
Key_5 = $06;
Key_6 = $07;
Key_7 = $08;
Key_8 = $09;
Key_9 = $0A;
Key_0 = $0B;
Key_F1 = $3B;
Key_F2 = $3C;
Key_F3 = $3D;
Key_F4 = $3E;
Key_F5 = $3F;
Key_F6 = $40;
Key_F7 = $41;
Key_F8 = $42;
Key_F9 = $43;
Key_F10 = $44;
Key_Space = $39;
Key_Enter = $1C;
Key_Tab = $0F;
Key_SysReq = $54;
Key_BackSpace = $0E;
Key_Ins = $52;
Key_Del = $53;
Key_Home = $47;
Key_UpArrow = $48;
Key_PgUp = $49;
Key_LeftArrow = $4B;
Key_RightArrow = $4D;
Key_DownArrow = $50;
Key_End = $4F;
Key_PgDn = $51;
Key_NumLock = $45;
Key_ScrollLock = $46;
Key_Ctrl = $1D;
Key_shift = $2A;
Key_Alt = $38;
Key_CapsLock = $3A;
Key_minus = $0C;
Key_equal = $0D;
Key_period = $34;
Key_lbracket = $1A;
Key_rbracket = $1B;
Key_coma = $33;
Key_semi = $27;
Key_rquote = $28;
Key_lquote = $29;
Key_asterisk = $37;
Key_GrayMinus = $4A;
Key_Center5 = $4C;
Key_GrayPlus = $4E;
Key_backslash = $2B;
Key_forwslash = $35;
PointingHand: MaskType =
(($E1FF,$E1FF,$E1FF,$E1FF,$E1ff,$E000,$E000,$e000, { Screen Mask }
$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000),
($1E00,$1200,$1200,$1200,$1200,$13ff,$1249,$1249, { Cursor Mask }
$1249,$9001,$9001,$9001,$8001,$8001,$8001,$FFFF));
HourGlass: MaskType =
(($0000,$0000,$0000,$0000,$8001,$C003,$E007,$F00F,
$E007,$C003,$8001,$0000,$0000,$0000,$0000,$FFFF),
($0000,$7FFE,$6006,$300C,$1818,$0C30,$0660,$03C0,
$0660,$0C30,$1998,$33CC,$67E6,$7FFE,$0000,$0000));
Standard: MaskType =
(($3FFF,$1FFF,$0FFF,$07FF,$03FF,$01FF,$00FF,$007F,
$003F,$001F,$01FF,$10FF,$30FF,$F87F,$F87F,$FC7F),
($0000,$4000,$6000,$7000,$7800,$7C00,$7E00,$7F00,
$7F80,$7C00,$6C00,$4600,$0600,$0300,$0300,$0000));
DiagCross: MaskType =
(($07E0,$0180,$0000,$C003,$F00F,$C003,$0000,$0180,
$07E0,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF),
($0000,$700E,$1C38,$0660,$03C0,$0660,$1C38,$700E,
$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000));
CheckMark: MaskType =
(($FFF0,$FFE0,$FFC0,$FF03,$0607,$000F,$001F,$C03F,
$F07F,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF),
($0000,$0006,$000C,$0018,$0030,$0060,$70C0,$1D80,
$0700,$0000,$0000,$0000,$0000,$0000,$0000,$0000));
MaskCURSOR : Masktype =
(($07FF,$07FF,$07FF,$8FFF,$8FFF,$8FFF,$8FFF,$8FFF,
$8FFF,$8FFF,$8FFF,$07FF,$07FF,$07FF,$FFFF,$FFFF),
($0000,$7000,$2000,$2000,$2000,$2000,$2000,$2000,
$2000,$2000,$2000,$2000,$7000,$0000,$0000,$0000));
ScancodeTable : Array [1..127] of Boolean =
(
{code 01} FALSE, {ESC}
{code 02} FALSE, {1}
{code 03} FALSE, {2}
{code 04} FALSE, {3}
{code 05} FALSE, {4}
{code 06} FALSE, {5}
{code 07} FALSE, {6}
{code 08} FALSE, {7}
{code 09} FALSE, {8}
{code 0A} FALSE, {9}
{code 0B} FALSE, {0}
{code 0C} FALSE, {-}
{code 0D} FALSE, {=}
{code 0E} FALSE, {BackSpace}
{code 0F} FALSE, {Tab}
{code 10} FALSE, {q}
{code 11} FALSE, {w}
{code 12} FALSE, {e}
{code 13} FALSE, {r}
{code 14} FALSE, {t}
{code 15} FALSE, {y}
{code 16} FALSE, {u}
{code 17} FALSE, {i}
{code 18} FALSE, {o}
{code 19} FALSE, {p}
{code 1A} FALSE, {[}
{code 1B} FALSE, {]}
{code 1C} FALSE, {Enter}
{code 1D} FALSE, {Ctrl}
{code 1E} FALSE, {a}
{code 1F} FALSE, {s}
{code 20} FALSE, {d}
{code 21} FALSE, {f}
{code 22} FALSE, {g}
{code 23} FALSE, {h}
{code 24} FALSE, {j}
{code 25} FALSE, {k}
{code 26} FALSE, {l}
{code 27} FALSE, {;}
{code 28} FALSE, {'}
{code 29} FALSE, {`}
{code 2A} FALSE, {shift}
{code 2B} FALSE, {\}
{code 2C} FALSE, {z}
{code 2D} FALSE, {x}
{code 2E} FALSE, {c}
{code 2F} FALSE, {v}
{code 30} FALSE, {b}
{code 31} FALSE, {n}
{code 32} FALSE, {m}
{code 33} FALSE, {,}
{code 34} FALSE, {.}
{code 35} FALSE, {/}
{code 36} FALSE,
{code 37} FALSE, {Gra